package cn.dliyy.warehouse.common;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.ModelMap;
import org.springframework.web.servlet.mvc.SimpleFormController;

public class CategoryMap extends SimpleFormController{
	@Override
	protected Map referenceData(HttpServletRequest request) throws Exception {
	Map favoriteMap = new LinkedHashMap();
	favoriteMap.put("1", "computer");
	favoriteMap.put("2", "sport");
	favoriteMap.put("3", "entertainment");
	favoriteMap.put("4", "literature");
	List cityList = new ArrayList();//①为下拉框选项准备的数据
	cityList.add("北京");
	cityList.add("上海");
	cityList.add("天津");
	cityList.add("厦门");
	return new ModelMap()
	.addObject("favoriteMap", favoriteMap)
	.addObject("cityList", cityList);
	}
}
